<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title>首页</title>
	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no" />
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<meta name="apple-mobile-web-app-status-bar-style" content="black" />
	<script src="__PUBLIC__/js/jquery-1.9.0.js"></script>
	<script src="__PUBLIC__/home/plugins/layer/layer.js"></script>
	<script src="__PUBLIC__/js/angular.js"></script>
	<!--标准mui.css-->
	<link rel="stylesheet" href="__PUBLIC__/mui/css/mui.css" />
	<!--App自定义的css-->
	<link rel="stylesheet" href="__PUBLIC__/css/app.css" />
	<link rel="stylesheet" href="__PUBLIC__/css/user.css" />

	<style>
		#member-login{
			display: none;
		}
		.area {
			margin: 20px auto 0px auto;
		}

		.mui-input-group {
			margin-top: 10px;
		}

		.mui-input-group:first-child {
			margin-top: 20px;
		}

		.mui-input-group label {
			width: 30%;
			font-size: 15px;
			color: grey;

		}

		.mui-input-row label~input,
		.mui-input-row label~select,
		.mui-input-row label~textarea {
			width: 70%;
		}

		.mui-checkbox input[type=checkbox],
		.mui-radio input[type=radio] {
			top: 6px;
		}

		.mui-content-padded {
			margin-top: 25px;
		}

		.mui-btn {
			padding: 10px;
		}

		.link-area {
			display: block;
			margin-top: 25px;
			text-align: center;
		}

		.spliter {
			color: #bbb;
			padding: 0px 8px;
		}

		.oauth-area {
			position: absolute;
			bottom: 20px;
			left: 0px;
			text-align: center;
			width: 100%;
			padding: 0px;
			margin: 0px;
		}

		.oauth-area .oauth-btn {
			display: inline-block;
			width: 50px;
			height: 50px;
			background-size: 30px 30px;
			background-position: center center;
			background-repeat: no-repeat;
			margin: 0px 20px;
			/*-webkit-filter: grayscale(100%); */
			border: solid 1px #ddd;
			border-radius: 25px;
		}

		.oauth-area .oauth-btn:active {
			border: solid 1px #aaa;
		}

		.oauth-area .oauth-btn.disabled {
			background-color: #ddd;
		}

		.login-active {
			background: #f3363a;
		}
		.content{
			width: 70%;
			float: right;
			line-height: 40px;
			height: 40px;
			text-indent: 2em;
			font-size: 14px;
			text-align: right;
			padding-right: 1em;

		}
		.go-item{
			position: absolute;
			bottom: 0;
			left: 0 ;
			right: 0;
			padding: 0;
			margin: 0;
			background: white;
			height: 60px;
			text-align: center;

		}
		#user-login .mui-input-row .time{
			width: 65%;
		}
		#user-login .mui-input-row .status{
			width: 35%;
			font-size: 14px;
			font-weight: bold;
			font-family: "Microsoft YaHei UI Light";
		}



		.mui-input-group  .mui-input-row:nth-child(1):after{
			background: none;
		}
		.mui-input-group  .mui-input-row:last-child:after{
			background: none;
		}
		#user-login .mui-input-group{
			margin-top: 0;
		}
		#withdraw{
			color: white;font-size: 16px;line-height: 44px;
			margin: 0;padding: 0;height: 44px;
		}


	</style>
</head>
<body ng-app="myApp" ng-controller="Ctrl" ng-cloak>
<!--header-->
<header class="mui-bar mui-bar-nav" style="background:#f3363a;" >
	<h1 class="mui-title login-item" style="color: white">乐荟云商</h1>
</header>

<div class="mui-content"   >
	<div class="mui-input-group" style="margin-top: 3px" ng-repeat="ag in message">
		<div class="mui-input-row" style="background:#f0f0f0">
			<label class="time" style="width: 40%;">当前产品数量</label>
			<!--<div class="content status" style="color: #f2373b">状态区</div>-->
		</div>
	</div>
</div>
	<ul class="mui-table-view mui-grid-view mui-grid-9" style="background-color: #ffffff">
		<li class="mui-table-view-cell mui-media mui-col-xs-6 mui-col-sm-6" ng-repeat="pro in agenstock">
			<a href="#">
				<span ng-hide="pro.num*1 >= pro.boxnum*1">{{pro.num}}盒</span>
				<span ng-show="pro.num*1 >= pro.boxnum*1">{{floor(pro.num/pro.boxnum)}}箱{{pro.num%pro.boxnum}}盒</span>
				<div class="mui-media-body">{{pro.name}}</div>
			</a>
		</li>
	</ul>
<div class="user" style="margin-top:5px">
	<ul class="mui-table-view mui-grid-view mui-grid-9 item" style="margin-top: 0">
		<li style="height: 95px;"  class="mui-table-view-cell mui-media mui-col-xs-6 mui-col-sm-6 invite"><a href="{:U('agen/mybaodan')}">
			<div class="img-bg-mybaodan" style="height: 55px;margin-top: -20px;"></div>
			<div class="mui-media-body">
				我的报单
			</div></a></li>
		<li style="height: 95px;"  class="mui-table-view-cell mui-media mui-col-xs-6 mui-col-sm-6"><a href="{:U('agen/orderreport')}">
			<div class="img-bg-gobaodan" style="height: 55px;margin-top: -20px;"></div>
			<div class="mui-media-body">
				去报单
			</div></a></li>
	</ul>

	<div class="mui-input-group" style="margin-top: 3px"  >
		<div class="mui-input-row" style="background:#f0f0f0">
			<label class="time" style="width: 40%;">报单管理</label>
			<!--<div class="content status" style="color: #f2373b">状态区</div>-->
		</div>
	</div>
	<ul class="mui-table-view mui-grid-view mui-grid-9 item" style="margin-top: 0">
		<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3 invite"><a href="{:U('agen/baodanguanli')}">
			<div class="img-bg-all"></div>
			<div class="mui-media-body">
				全部
			</div></a></li>
		<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="/index.php/Home/agen/baodanguanli?flg=1">
			<div class="img-bg-daishenhe"></div>
			<div class="mui-media-body">
				待审核
			</div></a></li>
		<li class="mui-table-view-cell mui-media mui-col-xs-4 mui-col-sm-3"><a href="/index.php/Home/agen/baodanguanli?flg=3">
			<div class="img-bg-yishenhe"></div>
			<div class="mui-media-body">
				已审核
			</div></a></li>
	</ul>
</div>

<div style="height: 50px"></div>
<!--footer-->
<script src="__PUBLIC__/mui/js/mui.min.js"></script>
<include file="./Application/Home/View/pub/agentfoot.html" name="b" />

<script>
	var app = angular.module("myApp", []);

	app.controller('Ctrl', function ($scope, $http) {
		$http({
			method: 'GET',
			url: "/index.php/Home/AgentOnlineorder/myagenstock"
		}).then(function successCallback(response) {
			//console.log(response.data);
			$scope.agenstock = response.data.data;
			$scope.floor = function(number) {
				return Math.floor(number);
			};
		}, function errorCallback(response) {
		});
	})
</script>
<script>
    mui.init({
        swipeBack: true //启用右滑关闭功能
    });
    var slider = mui("#slider");
    slider.slider({
        interval: 1500
    });

    $(function () {
        $(".mui-tab-item").click(function () {
            window.location.href=$(this).attr("href")
        })
    })
</script>
</body>
</html>